<html>
<head><meta charset="utf-8"><title>profiling-rustc · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html">profiling-rustc</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="127603987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127603987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127603987">(Jun 05 2018 at 14:41)</a>:</h4>
<p>So <span class="user-mention" data-user-id="116083">@pnkfelix</span> suggested that it'd be helpful for me to teach someone else how I do profiles of rustc. To use my setup, you do need to be using linux; he suggested I do a pairing session with <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> or <span class="user-mention" data-user-id="116013">@qmx</span> and make a video</p>



<a name="127603990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127603990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127603990">(Jun 05 2018 at 14:41)</a>:</h4>
<p>I'd be up for that if either of you are down</p>



<a name="127603995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127603995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127603995">(Jun 05 2018 at 14:41)</a>:</h4>
<p>that said, I could also try to just write the instructions out, it ain't <em>that</em> complex</p>



<a name="127603997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127603997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127603997">(Jun 05 2018 at 14:41)</a>:</h4>
<p>maybe both is good :)</p>



<a name="127604059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> qmx <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604059">(Jun 05 2018 at 14:42)</a>:</h4>
<p>I'm up for it, we just need to find a time that works for us both :)</p>



<a name="127604146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604146">(Jun 05 2018 at 14:44)</a>:</h4>
<p>that's the trick I suppose</p>



<a name="127604149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604149">(Jun 05 2018 at 14:44)</a>:</h4>
<p>the first thing in any case is to prep a build of rust-lang/master with the right config.toml :)</p>



<a name="127604154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604154">(Jun 05 2018 at 14:45)</a>:</h4>
<p>that alone takes a good 30 minutes...</p>



<a name="127604164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604164">(Jun 05 2018 at 14:45)</a>:</h4>
<p>...or longer I suppose :)</p>



<a name="127604168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604168">(Jun 05 2018 at 14:45)</a>:</h4>
<p>let me try to make a gist in any case</p>



<a name="127604655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604655">(Jun 05 2018 at 14:54)</a>:</h4>
<p>Any idea if a Linux VM or Docker container works? For those of us not on Linux ;-)</p>



<a name="127604756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604756">(Jun 05 2018 at 14:56)</a>:</h4>
<p>I guess maybe</p>



<a name="127604847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604847">(Jun 05 2018 at 14:58)</a>:</h4>
<p>this is probably gonna use perf + some of niko's focus scripts, but in general valgrind/callgrind also work on osx (not High Sierra IIRC), and ofc Instruments</p>



<a name="127604859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604859">(Jun 05 2018 at 14:59)</a>:</h4>
<p>yeah so my setup is not the only one :)</p>



<a name="127604862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604862">(Jun 05 2018 at 14:59)</a>:</h4>
<p>valgrind etc is also fine</p>



<a name="127604867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604867">(Jun 05 2018 at 14:59)</a>:</h4>
<p>I'm just .. prone to use the tools I wrote, since naturally they work the way my mind works ;)</p>



<a name="127604958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127604958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127604958">(Jun 05 2018 at 15:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116113">@lqd</span> Oh, I use Instruments, but sometimes switching between tools gets you different info to lead to new places to explore, which is my interest. And yeah, Valgrind always lags behind, sadly.</p>



<a name="127605038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127605038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127605038">(Jun 05 2018 at 15:02)</a>:</h4>
<p>but CPU counting profilers seem like they would be ok in VMs, but wallclock-based would be less so.</p>



<a name="127605818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127605818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127605818">(Jun 05 2018 at 15:19)</a>:</h4>
<p>here is a gist where I am writing up my procedure:</p>



<a name="127605822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127605822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127605822">(Jun 05 2018 at 15:19)</a>:</h4>
<p>naturally i've found there is more to write than I thought</p>



<a name="127605824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127605824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127605824">(Jun 05 2018 at 15:19)</a>:</h4>
<p>seems like good material for the rustc-guide</p>



<a name="127605834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127605834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127605834">(Jun 05 2018 at 15:20)</a>:</h4>
<p>gist url: <a href="https://gist.github.com/nikomatsakis/45e81ac4cfcf21c665176e3e2907f40e" target="_blank" title="https://gist.github.com/nikomatsakis/45e81ac4cfcf21c665176e3e2907f40e">https://gist.github.com/nikomatsakis/45e81ac4cfcf21c665176e3e2907f40e</a></p>



<a name="127605925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127605925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127605925">(Jun 05 2018 at 15:21)</a>:</h4>
<p>(needs to lose the /edit at the end)</p>



<a name="127605929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127605929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127605929">(Jun 05 2018 at 15:21)</a>:</h4>
<p>I hate that</p>



<a name="127606069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127606069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127606069">(Jun 05 2018 at 15:24)</a>:</h4>
<p>I've always enjoyed the rationale behind 99Hz</p>



<a name="127606739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127606739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> qmx <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127606739">(Jun 05 2018 at 15:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> I work from a container - even on linux - it works</p>



<a name="127606885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127606885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127606885">(Jun 05 2018 at 15:42)</a>:</h4>
<p><span class="user-mention" data-user-id="116013">@qmx</span> there's "works" and then there's "produces correct / useful output" <span class="emoji emoji-1f61c" title="stuck out tongue winking eye">:stuck_out_tongue_winking_eye:</span>. A wallclock-based / sampling profiler <em>works</em> in a VM, but may overinflate IO timings, virtualized syscalls, etc.</p>



<a name="127606968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127606968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> qmx <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127606968">(Jun 05 2018 at 15:44)</a>:</h4>
<p>you're totally right</p>



<a name="127606998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127606998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127606998">(Jun 05 2018 at 15:45)</a>:</h4>
<p>ok, updated the gist with more details</p>



<a name="127607012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127607012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> qmx <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127607012">(Jun 05 2018 at 15:45)</a>:</h4>
<p>what I do is run a single container on a big machine, so the overhead should be minimal (I just want to have a turn-key dev env)</p>



<a name="127607077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127607077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127607077">(Jun 05 2018 at 15:46)</a>:</h4>
<blockquote>
<p>So <span class="user-mention" data-user-id="116083">@pnkfelix</span> suggested that it'd be helpful for me to teach someone else how I do profiles of rustc. To use my setup, you do need to be using linux; he suggested I do a pairing session with <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> or <span class="user-mention" data-user-id="116013">@qmx</span> and make a video</p>
</blockquote>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> let me know if you need something from me :)</p>



<a name="127607089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127607089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127607089">(Jun 05 2018 at 15:46)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> well, so I wrote <a href="https://gist.github.com/nikomatsakis/45e81ac4cfcf21c665176e3e2907f40e" target="_blank" title="https://gist.github.com/nikomatsakis/45e81ac4cfcf21c665176e3e2907f40e">this gist</a> that contains the directions for how to analyze performance</p>



<a name="127607092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127607092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127607092">(Jun 05 2018 at 15:46)</a>:</h4>
<p>a good first step would be:</p>



<a name="127607101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127607101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127607101">(Jun 05 2018 at 15:47)</a>:</h4>
<p>try to follow it and use it to analyze the <code>inflate</code> test</p>



<a name="127607111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127607111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127607111">(Jun 05 2018 at 15:47)</a>:</h4>
<p>this will let me know what steps I've forgotten to document ;)</p>



<a name="127607115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127607115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127607115">(Jun 05 2018 at 15:47)</a>:</h4>
<p>but also will give us some info on what that test is so ridiculously slow</p>



<a name="127607181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127607181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127607181">(Jun 05 2018 at 15:48)</a>:</h4>
<p>ok</p>



<a name="127607213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127607213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127607213">(Jun 05 2018 at 15:49)</a>:</h4>
<p>(another polonius datapoint, leapfrog is actually a bit slower than datafrog_opt on inflate)</p>



<a name="127607538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127607538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127607538">(Jun 05 2018 at 15:55)</a>:</h4>
<p>Clearly you have to race all the algorithms in parallel, taking the first to finish.</p>



<a name="127609969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127609969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127609969">(Jun 05 2018 at 16:47)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> starting to follow your gist :), <code>debuginfo-lines = true</code> and <code>debuginfo = false</code>?</p>



<a name="127610021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127610021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127610021">(Jun 05 2018 at 16:48)</a>:</h4>
<p>yes</p>



<a name="127610063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127610063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127610063">(Jun 05 2018 at 16:49)</a>:</h4>
<p>ok, building the thing</p>



<a name="127613028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613028">(Jun 05 2018 at 17:55)</a>:</h4>
<div class="codehilite"><pre><span></span>   Compiling rustc_asan v0.0.0 (file:///home/santiago/src/oss/rust-perf/src/librustc_asan)
error: failed to run custom build command for `compiler_builtins v0.0.0 (file:///home/santiago/src/oss/rust-perf/src/rustc/compiler_builtins_shim)`
process didn&#39;t exit successfully: `/home/santiago/src/oss/rust-perf/build/x86_64-unknown-linux-gnu/stage0-std/release/build/compiler_builtins-c62c02041b0ab233/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/absvsi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/absvti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/addvdi3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/addvsi3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/addvti3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/apple_versioning.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/clzdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/clzsi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/clzti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/cmpdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/cmpti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ctzdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ctzsi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ctzti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/divdc3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/divsc3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/divxc3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/extendhfsf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ffsdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ffsti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/x86_64/floatdisf.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/x86_64/floatdixf.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/x86_64/floatundidf.S
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/x86_64/floatundisf.S
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/x86_64/floatundixf.S
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/int_util.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/muldc3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/mulsc3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/mulvdi3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/mulvsi3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/mulvti3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/mulxc3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negdf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negsf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negvdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negvsi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negvti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/paritydi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/paritysi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/parityti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/popcountdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/popcountsi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/popcountti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/powixf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/subvdi3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/subvsi3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/subvti3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/truncdfhf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/truncdfsf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/truncsfhf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ucmpdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ucmpti2.c
TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)
OPT_LEVEL = Some(&quot;2&quot;)
TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)
HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)
TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)
TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)
HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)
CC_x86_64-unknown-linux-gnu = Some(&quot;cc&quot;)
TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)
HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)
CFLAGS_x86_64-unknown-linux-gnu = Some(&quot;-ffunction-sections -fdata-sections -fPIC -m64&quot;)
DEBUG = Some(&quot;false&quot;)
TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)
CC_x86_64-unknown-linux-gnu = Some(&quot;cc&quot;)
CFLAGS_x86_64-unknown-linux-gnu = Some(&quot;-ffunction-sections -fdata-sections -fPIC -m64&quot;)
running: &quot;cc&quot; &quot;-O2&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-m64&quot; &quot;-fno-builtin&quot; &quot;-fvisibility=hidden&quot; &quot;-ffreestanding&quot; &quot;-fomit-frame-pointer&quot; &quot;-DVISIBILITY_HIDDEN&quot; &quot;-o&quot; &quot;/home/santiago/src/oss/rust-perf/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-ffd422941bf53e42/out/../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.o&quot; &quot;-c&quot; &quot;../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c&quot;
cargo:warning=cc: error: ../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c: No such file or directory
cargo:warning=cc: fatal error: no input files
cargo:warning=compilation terminated.
exit code: 1

--- stderr
thread &#39;main&#39; panicked at &#39;

Internal error occurred: Command &quot;cc&quot; &quot;-O2&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-m64&quot; &quot;-fno-builtin&quot; &quot;-fvisibility=hidden&quot; &quot;-ffreestanding&quot; &quot;-fomit-frame-pointer&quot; &quot;-DVISIBILITY_HIDDEN&quot; &quot;-o&quot; &quot;/home/santiago/src/oss/rust-perf/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-ffd422941bf53e42/out/../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.o&quot; &quot;-c&quot; &quot;../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c&quot; with args &quot;cc&quot; did not execute successfully (status code exit code: 1).

&#39;, /home/santiago/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.15/src/lib.rs:2158:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: &quot;/home/santiago/src/oss/rust-perf/build/x86_64-unknown-linux-gnu/stage0/bin/cargo&quot; &quot;build&quot; &quot;--target&quot; &quot;x86_64-unknown-linux-gnu&quot; &quot;-j&quot; &quot;4&quot; &quot;--release&quot; &quot;--features&quot; &quot;panic-unwind backtrace&quot; &quot;--manifest-path&quot; &quot;/home/santiago/src/oss/rust-perf/src/libstd/Cargo.toml&quot; &quot;--message-format&quot; &quot;json&quot;
expected success, got: exit code: 101
thread &#39;main&#39; panicked at &#39;cargo must succeed&#39;, bootstrap/compile.rs:1091:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
failed to run: /home/santiago/src/oss/rust-perf/build/bootstrap/debug/bootstrap build
Build completed unsuccessfully in 0:02:16
</pre></div>



<a name="127613034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613034">(Jun 05 2018 at 17:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> it's always failing here</p>



<a name="127613153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613153">(Jun 05 2018 at 17:57)</a>:</h4>
<p>Have you tried something like <code>git submodule update --init</code>?</p>



<a name="127613157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613157">(Jun 05 2018 at 17:57)</a>:</h4>
<p>uh...</p>



<a name="127613165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613165">(Jun 05 2018 at 17:57)</a>:</h4>
<p>Generally speaking that type of error comes from stale submodules</p>



<a name="127613181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613181">(Jun 05 2018 at 17:57)</a>:</h4>
<p>/me glad <span class="user-mention" data-user-id="116122">@Mark Simulacrum</span> is here</p>



<a name="127613233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613233">(Jun 05 2018 at 17:58)</a>:</h4>
<p>...what Mark said :)</p>



<a name="127613401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613401">(Jun 05 2018 at 18:02)</a>:</h4>
<p>and updating is on by default, IIRC, so you probably turned it off?</p>



<a name="127613482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613482">(Jun 05 2018 at 18:03)</a>:</h4>
<p>that is confusing yes -- I feel like <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> you've hit problems with this before?</p>



<a name="127613483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613483">(Jun 05 2018 at 18:03)</a>:</h4>
<p>I rarely do</p>



<a name="127613489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613489">(Jun 05 2018 at 18:03)</a>:</h4>
<p>or never</p>



<a name="127613561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613561">(Jun 05 2018 at 18:05)</a>:</h4>
<p>I think this periodically happens when submodules change... but I've never narrowed it down</p>



<a name="127613567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613567">(Jun 05 2018 at 18:05)</a>:</h4>
<p>We've "optimized" the submodule code to do less work, primarily because of Windows where that's super slow</p>



<a name="127613569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613569">(Jun 05 2018 at 18:05)</a>:</h4>
<p>That leads to this sort of problem</p>



<a name="127613636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613636">(Jun 05 2018 at 18:07)</a>:</h4>
<blockquote>
<p>Have you tried something like <code>git submodule update --init</code>?</p>
</blockquote>
<p>yes, it's not that</p>



<a name="127613650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613650">(Jun 05 2018 at 18:07)</a>:</h4>
<p>just cloned the thing</p>



<a name="127613654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613654">(Jun 05 2018 at 18:07)</a>:</h4>
<p>ran git submodule update --init</p>



<a name="127613698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613698">(Jun 05 2018 at 18:08)</a>:</h4>
<p>changed the config.toml to what <span class="user-mention" data-user-id="116009">@nikomatsakis</span> suggested and ran ./x.py build</p>



<a name="127613789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613789">(Jun 05 2018 at 18:10)</a>:</h4>
<p>in particular</p>



<a name="127613796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613796">(Jun 05 2018 at 18:10)</a>:</h4>
<div class="codehilite"><pre><span></span>cargo:warning=cc: error: ../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c: No such file or directory
cargo:warning=cc: fatal error: no input files
cargo:warning=compilation terminated.
exit code: 1
</pre></div>



<a name="127613872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613872">(Jun 05 2018 at 18:12)</a>:</h4>
<p>what on earth</p>



<a name="127613879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613879">(Jun 05 2018 at 18:12)</a>:</h4>
<p>starting fresh again just in case</p>



<a name="127613895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127613895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127613895">(Jun 05 2018 at 18:13)</a>:</h4>
<p>ok</p>



<a name="127614573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127614573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127614573">(Jun 05 2018 at 18:27)</a>:</h4>
<p>I think I've found the issue</p>



<a name="127614575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127614575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127614575">(Jun 05 2018 at 18:27)</a>:</h4>
<p><code>git submodule update --init --recursive</code></p>



<a name="127614583"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127614583" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127614583">(Jun 05 2018 at 18:27)</a>:</h4>
<p>the recursive bit is important</p>



<a name="127614625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127614625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127614625">(Jun 05 2018 at 18:28)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux rust-perf (master)]$ git submodule update --init --recursive
Submodule &#39;compiler-rt&#39; (https://github.com/rust-lang/compiler-rt) registered for path &#39;src/libcompiler_builtins/compiler-rt&#39;
Cloning into &#39;/home/santiago/src/oss/rust-perf/src/libcompiler_builtins/compiler-rt&#39;...
Submodule path &#39;src/libcompiler_builtins/compiler-rt&#39;: checked out &#39;dfd960b5f1a1751b22738fa34fd27b583f4618db&#39;
</pre></div>



<a name="127614757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127614757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127614757">(Jun 05 2018 at 18:31)</a>:</h4>
<p>I don't get why you have to do this manually</p>



<a name="127614760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127614760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127614760">(Jun 05 2018 at 18:31)</a>:</h4>
<p>I never do this kind of stuff :)</p>



<a name="127614762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127614762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127614762">(Jun 05 2018 at 18:31)</a>:</h4>
<p>at most I occasionally run <code>rm -rf build</code></p>



<a name="127614841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127614841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127614841">(Jun 05 2018 at 18:33)</a>:</h4>
<p>I don't need to do this manually I guess</p>



<a name="127614850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127614850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127614850">(Jun 05 2018 at 18:33)</a>:</h4>
<p>the thing is that I was already bitten by this</p>



<a name="127614856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127614856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127614856">(Jun 05 2018 at 18:33)</a>:</h4>
<p>so I just did it</p>



<a name="127614919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127614919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127614919">(Jun 05 2018 at 18:34)</a>:</h4>
<p>I don't know exactly the steps you need to follow to end in a state where you really need to run git submodule update --init</p>



<a name="127615089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127615089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127615089">(Jun 05 2018 at 18:37)</a>:</h4>
<p>ah, yeah, recursive</p>



<a name="127615170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127615170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127615170">(Jun 05 2018 at 18:39)</a>:</h4>
<p>I guess <code>x.py</code> doesn't do the right thing? or need to be fixed in some way?</p>



<a name="127615303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127615303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127615303">(Jun 05 2018 at 18:41)</a>:</h4>
<p>I think I mentioned above -- x.py tries to be smart to do less filesystem operations because those are slow on Windows; that means that I think it doesn't detect stale submodules quite as well. Perhaps that's especially true when they're nested.</p>



<a name="127646657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127646657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127646657">(Jun 06 2018 at 09:13)</a>:</h4>
<p>during the night I compiled a rustc like Niko's gist as well (it takes a while on a 7y old macbook air :3) and cargo checked inflate. it took a long time and I think segfaulted in the end, but there is some data — mainly, I think it's the liveness in the MIR typechecking</p>



<a name="127646745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127646745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127646745">(Jun 06 2018 at 09:15)</a>:</h4>
<p>if the callgrind profile can be useful I can upload it, otherwise the liveness::generate is <a href="https://i.imgur.com/sDqi9X1.png" target="_blank" title="https://i.imgur.com/sDqi9X1.png">https://i.imgur.com/sDqi9X1.png</a></p>
<div class="message_inline_image"><a href="https://i.imgur.com/sDqi9X1.png" target="_blank" title="https://i.imgur.com/sDqi9X1.png"><img src="https://i.imgur.com/sDqi9X1.png"></a></div>



<a name="127646894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127646894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127646894">(Jun 06 2018 at 09:19)</a>:</h4>
<p>Interesting. I should drill in a bit more with my instrumented build then.</p>



<a name="127647083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127647083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127647083">(Jun 06 2018 at 09:24)</a>:</h4>
<p>hopefully this profile isn't messed up and isn't a goose chase...</p>



<a name="127647301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127647301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127647301">(Jun 06 2018 at 09:30)</a>:</h4>
<p>it sounds reasonable</p>



<a name="127648266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127648266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127648266">(Jun 06 2018 at 09:59)</a>:</h4>
<p>I'm collecting a profile on clap now, which is the 2nd worst after inflate</p>



<a name="127648870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127648870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127648870">(Jun 06 2018 at 10:18)</a>:</h4>
<p>a bit more muddy (and unfamiliar to me): 4% in liveness, 4% in the mysterious visit_mir, 3% in visit_place, 16% in ena's SnapshotVec::set_all -- it'd probably be interesting to compare to a non-NLL profile, so I'll do that</p>



<a name="127652737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127652737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127652737">(Jun 06 2018 at 12:12)</a>:</h4>
<p>(I was mostly trying to compare these profiles using callgrind, to the ones w/ perf linked in the Paper doc)</p>



<a name="127653570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127653570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127653570">(Jun 06 2018 at 12:31)</a>:</h4>
<p>both the <code>liveness</code> and <code>set_all</code> costs are things i'm trying to address</p>



<a name="127653577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127653577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127653577">(Jun 06 2018 at 12:31)</a>:</h4>
<p>basically by doing smart (chalk-like, in fact) memoization</p>



<a name="127654083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127654083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127654083">(Jun 06 2018 at 12:44)</a>:</h4>
<p>and I'm guessing we can't easily help ?</p>



<a name="127654212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127654212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127654212">(Jun 06 2018 at 12:48)</a>:</h4>
<p>not sure how yet</p>



<a name="127659957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127659957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127659957">(Jun 06 2018 at 14:51)</a>:</h4>
<p>how does <a href="https://perf.rust-lang.org/nll-dashboard.html" target="_blank" title="https://perf.rust-lang.org/nll-dashboard.html">https://perf.rust-lang.org/nll-dashboard.html</a> works?</p>



<a name="127660004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127660004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127660004">(Jun 06 2018 at 14:52)</a>:</h4>
<p>I mean, what's in each column, and what's being compared exactly?</p>



<a name="127660215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127660215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127660215">(Jun 06 2018 at 14:56)</a>:</h4>
<p>We're comparing the equivalent of <code>cargo check</code> with <code>cargo check --with-nll</code> (if that was a flag); within one commit</p>



<a name="127660220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127660220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127660220">(Jun 06 2018 at 14:56)</a>:</h4>
<p>just the leaf crate is being built</p>



<a name="127660259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127660259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127660259">(Jun 06 2018 at 14:57)</a>:</h4>
<p>those are the -check benchmarks ?</p>



<a name="127660326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127660326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127660326">(Jun 06 2018 at 14:58)</a>:</h4>
<p>from the numbers it seems like so indeed :)</p>



<a name="127660576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127660576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127660576">(Jun 06 2018 at 15:03)</a>:</h4>
<p>Yeah, Niko said that there's no real point in having non-check benchmarks -- this should be illustrative of the difference</p>



<a name="127668162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127668162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127668162">(Jun 06 2018 at 17:46)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux inflate (master)]$ perf focus &#39;{do_mir_borrowck}&#39; --tree-callees --tree-min-percent 3
Matcher    : {do_mir_borrowck}
Matches    : 2290
Not Matches: 331
Percentage : 87%

Tree
| matched `{do_mir_borrowck}` (87% total, 0% self)
: | rustc_mir::borrow_check::nll::compute_regions (72% total, 0% self)
: : | rustc_mir::borrow_check::nll::type_check::type_check_internal (64% total, 0% self)
: : : | rustc_mir::borrow_check::nll::type_check::type_check::_$u7b$$u7b$closure$u7d$$u7d$::h5e644cf9693979bb (63% total, 0% self)
: : : : | rustc_mir::borrow_check::nll::type_check::liveness::generate (63% total, 59% self)
: : | rustc_mir::borrow_check::nll::region_infer::RegionInferenceContext::solve (6% total, 0% self)
: : : | rustc::util::common::time (6% total, 0% self)
: : : : | rustc_mir::borrow_check::nll::region_infer::RegionInferenceContext::solve_inner (6% total, 0% self)
: : : : : | rustc_mir::borrow_check::nll::region_infer::RegionInferenceContext::compute_region_values (6% total, 0% self)
: : : : : : | &lt;rustc_data_structures::bitvec::SparseBitMatrix&lt;R, C&gt;&gt;::merge (6% total, 0% self)
: : : : : : : | &lt;alloc::btree::map::BTreeMap&lt;K, V&gt;&gt;::entry (5% total, 1% self)
: : : : : : : : | alloc::btree::search::search_tree (3% total, 0% self)
: : : : : : : : : | alloc::btree::search::search_tree (3% total, 3% self)
: | rustc::mir::visit::Visitor::visit_mir (5% total, 3% self)
: | &lt;rustc_mir::borrow_check::MirBorrowckCtxt&lt;&#39;cx, &#39;gcx, &#39;tcx&gt; as rustc_mir::dataflow::DataflowResultsConsumer&lt;&#39;cx, &#39;tcx&gt;&gt;::visit_statement_entry (4% total, 0% self)
: | rustc_mir::dataflow::do_dataflow (3% total, 0% self)
</pre></div>



<a name="127668173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127668173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127668173">(Jun 06 2018 at 17:47)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="emoji emoji-261d" title="point up">:point_up:</span></p>



<a name="127668179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127668179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127668179">(Jun 06 2018 at 17:47)</a>:</h4>
<p>72% spent on compute_regions</p>



<a name="127668192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127668192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127668192">(Jun 06 2018 at 17:47)</a>:</h4>
<p>most of the time is in <code>rustc_mir::borrow_check::nll::type_check::liveness::generate</code> 63%</p>



<a name="127669035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127669035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127669035">(Jun 06 2018 at 18:03)</a>:</h4>
<p><code>rustc_mir::borrow_check::nll::region_infer::RegionInferenceContext::solve (6% total, 0% self)</code> that is sort of interesting</p>



<a name="127669049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127669049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127669049">(Jun 06 2018 at 18:03)</a>:</h4>
<p>I have an ongoing branch that I <em>hope</em> will improve the <code>liveness::generate</code> results</p>



<a name="127669054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127669054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127669054">(Jun 06 2018 at 18:03)</a>:</h4>
<p>but I didn't have any plans to improve <code>RegionInferenceContext::solve</code></p>



<a name="127669225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127669225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127669225">(Jun 06 2018 at 18:06)</a>:</h4>
<p>hehe</p>



<a name="127671253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127671253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127671253">(Jun 06 2018 at 18:45)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> I've not looked at anything after sentry-cli</p>



<a name="127671261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127671261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127671261">(Jun 06 2018 at 18:45)</a>:</h4>
<p>so if you wanted to do some measurements of some of those, seems like it could be useful</p>



<a name="127671401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127671401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127671401">(Jun 06 2018 at 18:48)</a>:</h4>
<p>(ok, back)</p>



<a name="127671407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127671407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127671407">(Jun 06 2018 at 18:48)</a>:</h4>
<p>I don't think we have to look at them <em>all</em></p>



<a name="127671416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127671416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127671416">(Jun 06 2018 at 18:48)</a>:</h4>
<p>but it'd be nice to make sure there is not some strikingly different pattern out there</p>



<a name="127671908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127671908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127671908">(Jun 06 2018 at 18:58)</a>:</h4>
<p>ok</p>



<a name="127671916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127671916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127671916">(Jun 06 2018 at 18:58)</a>:</h4>
<p>maybe I should start a document or something with the results?</p>



<a name="127672041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127672041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127672041">(Jun 06 2018 at 19:01)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> let's use <a href="https://paper.dropbox.com/doc/NLL-Performance-Tracking-Doc-dRlUMiWT8eexf80FTrYj8" target="_blank" title="https://paper.dropbox.com/doc/NLL-Performance-Tracking-Doc-dRlUMiWT8eexf80FTrYj8">this one that I just made</a></p>



<a name="127672121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127672121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127672121">(Jun 06 2018 at 19:02)</a>:</h4>
<p>was creating this <a href="https://paper.dropbox.com/doc/Profiling-of-rustc-perfs-benchmark-examples--AEcIIlo6J0xqvFBQ78VwegH_AQ-M6IR7tbGRqmRg8cwKZin2" target="_blank" title="https://paper.dropbox.com/doc/Profiling-of-rustc-perfs-benchmark-examples--AEcIIlo6J0xqvFBQ78VwegH_AQ-M6IR7tbGRqmRg8cwKZin2">https://paper.dropbox.com/doc/Profiling-of-rustc-perfs-benchmark-examples--AEcIIlo6J0xqvFBQ78VwegH_AQ-M6IR7tbGRqmRg8cwKZin2</a></p>



<a name="127672124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127672124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127672124">(Jun 06 2018 at 19:02)</a>:</h4>
<p>but ok</p>



<a name="127672125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127672125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127672125">(Jun 06 2018 at 19:02)</a>:</h4>
<p>let me paste that there</p>



<a name="127672137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127672137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127672137">(Jun 06 2018 at 19:03)</a>:</h4>
<p>or well you can decide what to do with the clap part :)</p>



<a name="127672259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127672259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127672259">(Jun 06 2018 at 19:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> take a look, do you think the tables are worth it? I'm not sure :)</p>



<a name="127672265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127672265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127672265">(Jun 06 2018 at 19:05)</a>:</h4>
<p>maybe just an indented list is fine...</p>



<a name="127672419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127672419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127672419">(Jun 06 2018 at 19:09)</a>:</h4>
<p>ok, I updated the template</p>



<a name="127672516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127672516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127672516">(Jun 06 2018 at 19:11)</a>:</h4>
<p>gonna have to step out for a bit soon</p>



<a name="127673606"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127673606" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127673606">(Jun 06 2018 at 19:34)</a>:</h4>
<p>let me check</p>



<a name="127673619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127673619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127673619">(Jun 06 2018 at 19:34)</a>:</h4>
<p>I think it's fine :)</p>



<a name="127678084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678084">(Jun 06 2018 at 21:05)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux sentry-cli (master)]$ perf focus &#39;{do_mir_borrowck}&#39; --tree-callees --relative --tree-max-depth 1 --tree-min-percent 5
Matcher    : {do_mir_borrowck}
Matches    : 0
Not Matches: 42
Percentage : 0%

Tree
</pre></div>



<a name="127678086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678086">(Jun 06 2018 at 21:05)</a>:</h4>
<p>hmm</p>



<a name="127678090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678090">(Jun 06 2018 at 21:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> when running the profile on <code>clap-rs</code> to confirm the <code>visit_mir</code> observation - is there anything other than <a href="https://gist.github.com/nikomatsakis/45e81ac4cfcf21c665176e3e2907f40e" target="_blank" title="https://gist.github.com/nikomatsakis/45e81ac4cfcf21c665176e3e2907f40e">these steps</a> that I need to do? I'm not seeing any mentions of <code>visit_mir</code> but I may have messed up in the profiling (<a href="https://gist.github.com/davidtwco/65218c446d927df0778b4d2aa8f53fb8" target="_blank" title="https://gist.github.com/davidtwco/65218c446d927df0778b4d2aa8f53fb8">here's what I'm seeing</a> from <code>perf-focus</code>)</p>



<a name="127678140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678140">(Jun 06 2018 at 21:06)</a>:</h4>
<p>hmm, no that should be it</p>



<a name="127678145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678145">(Jun 06 2018 at 21:06)</a>:</h4>
<p>interesting, because everybody else seemed to see it</p>



<a name="127678165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678165">(Jun 06 2018 at 21:06)</a>:</h4>
<p>Just to check, you did enable MIR borrowck?</p>



<a name="127678169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678169">(Jun 06 2018 at 21:06)</a>:</h4>
<p>also interesting because you have a missing %</p>



<a name="127678176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678176">(Jun 06 2018 at 21:07)</a>:</h4>
<p>43% total, but 32% and 3%</p>



<a name="127678183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678183">(Jun 06 2018 at 21:07)</a>:</h4>
<p>not sure if you guys are talking about <span class="user-mention" data-user-id="116107">@David Wood</span> case or mine ::P</p>



<a name="127678184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678184">(Jun 06 2018 at 21:07)</a>:</h4>
<p>leaving around 7% :)</p>



<a name="127678189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678189">(Jun 06 2018 at 21:07)</a>:</h4>
<p>I have enabled MIR borrowck, yeah</p>



<a name="127678192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678192">(Jun 06 2018 at 21:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> that was a case where you don't want <code>--lib</code> iirc</p>



<a name="127678198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678198">(Jun 06 2018 at 21:07)</a>:</h4>
<p>could that be it?</p>



<a name="127678201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678201">(Jun 06 2018 at 21:07)</a>:</h4>
<p>I did profile that one</p>



<a name="127678204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678204">(Jun 06 2018 at 21:07)</a>:</h4>
<p>ahh</p>



<a name="127678205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678205">(Jun 06 2018 at 21:07)</a>:</h4>
<p>could be</p>



<a name="127678208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678208">(Jun 06 2018 at 21:07)</a>:</h4>
<p>or you want to <code>touch src/main.rs</code></p>



<a name="127678209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678209">(Jun 06 2018 at 21:07)</a>:</h4>
<p>You can see what args perf passes from perf-config.json in the directory</p>



<a name="127678251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678251">(Jun 06 2018 at 21:08)</a>:</h4>
<p>oh, good to know</p>



<a name="127678253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678253">(Jun 06 2018 at 21:08)</a>:</h4>
<p>I could never figure out where those were</p>



<a name="127678258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678258">(Jun 06 2018 at 21:08)</a>:</h4>
<p>perf will also touch all files in the dir (<code>find . -name '*.rs' | xargs touch</code>)</p>



<a name="127678366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678366">(Jun 06 2018 at 21:10)</a>:</h4>
<p>which case are we talking about ? IIRC there is no <a href="http://main.rs" target="_blank" title="http://main.rs">main.rs</a> for clap right ? (Ok David is talking about clap, and Santiago about sentry-cli)</p>



<a name="127678377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678377">(Jun 06 2018 at 21:10)</a>:</h4>
<p>(shocked face) not <code>find -print0 | xargs -0</code>? how irresponsible ;-)</p>



<a name="127678470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678470">(Jun 06 2018 at 21:13)</a>:</h4>
<p>I ran <code>CARGO_INCREMENTAL=0 perf record -F99 --call-graph dwarf cargo +rust0-perf rustc --profile check --lib -- -Zborrowck=mir</code> to generate the perf data for my run.</p>



<a name="127678698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678698">(Jun 06 2018 at 21:18)</a>:</h4>
<p>that seems like it <em>should</em> work</p>



<a name="127678704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678704">(Jun 06 2018 at 21:18)</a>:</h4>
<p>what <code>perf focus</code> command did you use?</p>



<a name="127678713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678713">(Jun 06 2018 at 21:19)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux sentry-cli (master)]$ perf focus &#39;{do_mir_borrowck}&#39; --tree-callees --tree-min-percent 3
Matcher    : {do_mir_borrowck}
Matches    : 256
Not Matches: 430
Percentage : 37%

Tree
| matched `{do_mir_borrowck}` (37% total, 0% self)
: | rustc_mir::borrow_check::nll::compute_regions (26% total, 0% self)
: : | rustc_mir::borrow_check::nll::type_check::type_check_internal (22% total, 0% self)
: : : | rustc_mir::borrow_check::nll::type_check::type_check::_$u7b$$u7b$closure$u7d$$u7d$::h5e644cf9693979bb (16% total, 0% self)
: : : : | rustc_mir::borrow_check::nll::type_check::liveness::generate (16% total, 2% self)
: : : : : | rustc_mir::borrow_check::nll::type_check::TypeChecker::fully_perform_op (11% total, 0% self)
: : : : : : | rustc::infer::InferCtxt::commit_if_ok (5% total, 0% self)
: : : : : : : | rustc::traits::query::dropck_outlives::&lt;impl rustc::infer::at::At&lt;&#39;cx, &#39;gcx, &#39;tcx&gt;&gt;::dropck_outlives (4% total, 0% self)
: : : : : : | rustc::infer::InferCtxt::take_and_reset_region_constraints (4% total, 0% self)
: : : : : : : | rustc::infer::region_constraints::RegionConstraintCollector::take_and_reset_data (4% total, 0% self)
: : : : : : : : | &lt;ena::snapshot_vec::SnapshotVec&lt;D&gt;&gt;::set_all (4% total, 4% self)
: | &lt;rustc_mir::borrow_check::MirBorrowckCtxt&lt;&#39;cx, &#39;gcx, &#39;tcx&gt; as rustc_mir::dataflow::DataflowResultsConsumer&lt;&#39;cx, &#39;tcx&gt;&gt;::visit_terminator_entry (3% total, 0% self)
: : | rustc_mir::borrow_check::MirBorrowckCtxt::visit_terminator_drop (3% total, 0% self)
</pre></div>



<a name="127678737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678737">(Jun 06 2018 at 21:19)</a>:</h4>
<p>I used the same command as in Santiago's snippet there, doesn't show up in <code>perf report</code> either though.</p>



<a name="127678800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678800">(Jun 06 2018 at 21:20)</a>:</h4>
<p>could visit_mir be less than 3% and filtered out ?</p>



<a name="127678823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678823">(Jun 06 2018 at 21:21)</a>:</h4>
<p>could be, maybe try <code>--tree-max-depth 1</code></p>



<a name="127678834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678834">(Jun 06 2018 at 21:21)</a>:</h4>
<p>If I don't add in <code>--tree-min-percent</code> and grep for it then I still don't see it.</p>



<a name="127678886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678886">(Jun 06 2018 at 21:22)</a>:</h4>
<p>I'm wondered where that "lost" percentage has gone</p>



<a name="127678895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678895">(Jun 06 2018 at 21:22)</a>:</h4>
<div class="codehilite"><pre><span></span>❯ ~/.cargo/bin/perf-focus &#39;{do_mir_borrowck}&#39; --tree-callees --tree-max-depth 1
Matcher    : {do_mir_borrowck}
Matches    : 2184
Not Matches: 4383
Percentage : 33%

Tree
| matched `{do_mir_borrowck}` (33% total, 0% self)
: | rustc_mir::borrow_check::nll::compute_regions (24% total, 0% self) [...]
: | rustc_mir::dataflow::DataflowResultsConsumer::analyze_results (2% total, 0% self) [...]
: | rustc_mir::dataflow::do_dataflow (2% total, 0% self) [...]
: | &lt;rustc::mir::Mir&lt;&#39;tcx&gt; as rustc_mir::util::collect_writes::FindAssignments&gt;::find_assignments (1% total, 0% self) [...]
: | rustc_mir::borrow_check::nll::replace_regions_in_mir (0% total, 0% self) [...]
: | rustc_mir::dataflow::impls::borrows::Borrows::new (0% total, 0% self) [...]
: | &lt;alloc::rc::Rc&lt;T&gt; as core::ops::drop::Drop&gt;::drop (0% total, 0% self) [...]
: | rustc_mir::dataflow::move_paths::MoveData::gather_moves (0% total, 0% self) [...]
: | rustc_mir::borrow_check::borrow_set::BorrowSet::build (0% total, 0% self) [...]
: | core::ptr::drop_in_place (0% total, 0% self) [...]
: | &lt;rustc::mir::Mir&lt;&#39;tcx&gt; as core::clone::Clone&gt;::clone (0% total, 0% self) [...]
: | _init (0% total, 0% self)
: | rustc_mir::borrow_check::location::LocationTable::new (0% total, 0% self) [...]
: | rustc::ty::maps::&lt;impl rustc::ty::context::TyCtxt&lt;&#39;a, &#39;tcx, &#39;lcx&gt;&gt;::param_env (0% total, 0% self) [...]
: | rustc_data_structures::control_flow_graph::dominators::dominators (0% total, 0% self) [...]
</pre></div>



<a name="127678896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678896">(Jun 06 2018 at 21:22)</a>:</h4>
<p>because it comes to 7% or 8%</p>



<a name="127678897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678897">(Jun 06 2018 at 21:22)</a>:</h4>
<p>which is exactly what we saw</p>



<a name="127678911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678911">(Jun 06 2018 at 21:22)</a>:</h4>
<p><code>find_assignments</code> .. interesting</p>



<a name="127678934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678934">(Jun 06 2018 at 21:23)</a>:</h4>
<blockquote>
<p>could visit_mir be less than 3% and filtered out ?</p>
</blockquote>
<p>in my case it was</p>



<a name="127678937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678937">(Jun 06 2018 at 21:23)</a>:</h4>
<p>where are the last 4% ? :)</p>



<a name="127678989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678989">(Jun 06 2018 at 21:24)</a>:</h4>
<p>Well, it was 7% in niko's profiling of clap-rs, not inflate, so it might only be &lt; 3% for inflate.</p>



<a name="127678994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678994">(Jun 06 2018 at 21:24)</a>:</h4>
<p>(unless I'm mistaken)</p>



<a name="127678998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127678998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127678998">(Jun 06 2018 at 21:24)</a>:</h4>
<p>oh, wait, is this inflate?</p>



<a name="127679015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127679015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127679015">(Jun 06 2018 at 21:24)</a>:</h4>
<p>Mine isn't, I'm running it on <code>clap-rs</code>.</p>



<a name="127679055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127679055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127679055">(Jun 06 2018 at 21:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> btw, I'm not able to see analyze_results in the results, the top level thing seems to be visit_terminator_entry, ... unsure</p>



<a name="127679110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127679110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127679110">(Jun 06 2018 at 21:26)</a>:</h4>
<p>anyway, added entry-cli results here <a href="https://paper.dropbox.com/doc/NLL-Performance-Tracking-Doc-dRlUMiWT8eexf80FTrYj8" target="_blank" title="https://paper.dropbox.com/doc/NLL-Performance-Tracking-Doc-dRlUMiWT8eexf80FTrYj8">https://paper.dropbox.com/doc/NLL-Performance-Tracking-Doc-dRlUMiWT8eexf80FTrYj8</a></p>



<a name="127679915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127679915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127679915">(Jun 06 2018 at 21:35)</a>:</h4>
<p>I'd say just put what you see</p>



<a name="127681548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127681548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127681548">(Jun 06 2018 at 22:12)</a>:</h4>
<p>just looking at liveness and wondering: <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/nll/type_check/liveness.rs#L193-L217" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/nll/type_check/liveness.rs#L193-L217">this part</a> is not hot on the profiles we've seen, right ?</p>



<a name="127682730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127682730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127682730">(Jun 06 2018 at 22:42)</a>:</h4>
<p>njn would be good at this, I'm not sure they've looked at NLL during their recent rustc optimization work</p>



<a name="127683406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127683406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127683406">(Jun 06 2018 at 22:58)</a>:</h4>
<p>I believe that part is reasonably hot; that is part of what I am looking to memoize more.</p>



<a name="127683608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127683608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127683608">(Jun 06 2018 at 23:04)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> was going to measure serde as next in the list</p>



<a name="127683614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127683614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127683614">(Jun 06 2018 at 23:04)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux serde (master)]$ ls
appveyor.yml  Cargo.toml       LICENSE-APACHE  perf-config.json  rustfmt.toml  serde_derive            serde_test  test_suite
Cargo.lock    CONTRIBUTING.md  LICENSE-MIT     README.md         serde         serde_derive_internals  target      travis.sh
</pre></div>



<a name="127683615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127683615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127683615">(Jun 06 2018 at 23:04)</a>:</h4>
<p>I guess I should measure the internal serde crate, right?</p>



<a name="127683626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127683626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127683626">(Jun 06 2018 at 23:05)</a>:</h4>
<p>is that what shows up <a href="https://perf.rust-lang.org/nll-dashboard.html" target="_blank" title="https://perf.rust-lang.org/nll-dashboard.html">https://perf.rust-lang.org/nll-dashboard.html</a> ?</p>



<a name="127685319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127685319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127685319">(Jun 06 2018 at 23:51)</a>:</h4>
<p>Yes, that's what's measured by the dashboard. You can look in perf-config for the specific invocation</p>



<a name="127686418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127686418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127686418">(Jun 07 2018 at 00:26)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="thumbs up">:thumbs_up:</span></p>



<a name="127723262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127723262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127723262">(Jun 07 2018 at 15:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> are you familiar with <code>perf probe</code>? I am now learning about it and am wondering whether we might find it useful for instrumenting <code>rustc</code> binaries</p>



<a name="127723442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127723442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127723442">(Jun 07 2018 at 15:22)</a>:</h4>
<p>i suppose its probably not necessary for our use case...</p>



<a name="127747950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127747950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127747950">(Jun 08 2018 at 01:08)</a>:</h4>
<p>I had heard of it. I wanted to try and setup something with that and/or dtrace or one of the various other mechanisms to use for query profiling at some point. I remembered <span class="user-mention" data-user-id="116106">@Reed Koser</span> did some experimentation in this direction, right?</p>



<a name="127747990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127747990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127747990">(Jun 08 2018 at 01:08)</a>:</h4>
<p>I don't think we need it for NLL in particular</p>



<a name="127748605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127748605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127748605">(Jun 08 2018 at 01:25)</a>:</h4>
<p>Yeah, I played with integrating LTTNG into the query system</p>



<a name="127748608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127748608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127748608">(Jun 08 2018 at 01:25)</a>:</h4>
<p>it went... OK. I think I've misplaced some of the code for that</p>



<a name="127954467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127954467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127954467">(Jun 12 2018 at 13:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I've not looked into the <code>clap-rs</code> strangeness since mid last week when I couldn't reproduce your measurement, is there anything I should be doing on that?</p>



<a name="127954533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127954533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127954533">(Jun 12 2018 at 13:54)</a>:</h4>
<p>Hmm, if you can't reproduce, I don't see what — I've <em>almost</em> got my caching branch up and going — maybe we'll investigate again after that</p>



<a name="127954538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127954538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127954538">(Jun 12 2018 at 13:54)</a>:</h4>
<p>it's interesting though that you can't reproduce, since <span class="user-mention" data-user-id="116113">@lqd</span> and I both did (I can't remember if <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> did)</p>



<a name="127954544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127954544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127954544">(Jun 12 2018 at 13:55)</a>:</h4>
<p>one thing maybe worth looking at is the test case that <span class="user-mention" data-user-id="116122">@simulacrum</span> added</p>



<a name="127954550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127954550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127954550">(Jun 12 2018 at 13:55)</a>:</h4>
<p>"coercions"</p>



<a name="127954552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127954552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127954552">(Jun 12 2018 at 13:55)</a>:</h4>
<p>2,273.06% slower :)</p>



<a name="127954700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127954700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127954700">(Jun 12 2018 at 13:59)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  didn't you recently start measurements on coercions, or a bisect, which were literally in-flight ? :)</p>



<a name="127954841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127954841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127954841">(Jun 12 2018 at 14:02)</a>:</h4>
<p>ah no I was bisecting the test failure on <a href="https://github.com/rust-lang/rust/pull/51460" target="_blank" title="https://github.com/rust-lang/rust/pull/51460">https://github.com/rust-lang/rust/pull/51460</a></p>



<a name="127954843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127954843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127954843">(Jun 12 2018 at 14:02)</a>:</h4>
<p>which I did do</p>



<a name="127954845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127954845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127954845">(Jun 12 2018 at 14:02)</a>:</h4>
<p>and am now looking at the best way to fix ;)</p>



<a name="127955170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955170">(Jun 12 2018 at 14:09)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> about clap-rs?</p>



<a name="127955173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955173">(Jun 12 2018 at 14:09)</a>:</h4>
<p>I can try again</p>



<a name="127955330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955330">(Jun 12 2018 at 14:12)</a>:</h4>
<p>not clap-rs</p>



<a name="127955333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955333">(Jun 12 2018 at 14:12)</a>:</h4>
<p>er, I don't quite know what you are asking :)</p>



<a name="127955393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955393">(Jun 12 2018 at 14:14)</a>:</h4>
<blockquote>
<p>it's interesting though that you can't reproduce, since <span class="user-mention" data-user-id="116113">@lqd</span> and I both did (I can't remember if <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> did)</p>
</blockquote>
<p>this ^^^</p>



<a name="127955396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955396">(Jun 12 2018 at 14:14)</a>:</h4>
<p>anyway in case you need my data ...</p>



<a name="127955402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955402">(Jun 12 2018 at 14:14)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux clap-rs (master)]$ perf focus &#39;{do_mir_borrowck}&#39; --tree-callees --tree-min-percent 3
Matcher    : {do_mir_borrowck}
Matches    : 948
Not Matches: 793
Percentage : 54%

Tree
| matched `{do_mir_borrowck}` (54% total, 0% self)
: | rustc_mir::borrow_check::nll::compute_regions (33% total, 0% self)
: : | rustc_mir::borrow_check::nll::type_check::type_check (24% total, 0% self)
: : : | rustc_mir::borrow_check::nll::type_check::type_check_internal (24% total, 0% self)
: : : : | rustc_mir::borrow_check::nll::type_check::type_check::_$u7b$$u7b$closure$u7d$$u7d$::h2f6b8fe8a646401e (8% total, 0% self)
: : : : : | rustc_mir::borrow_check::nll::type_check::liveness::generate (8% total, 0% self)
: : : : : : | rustc_mir::borrow_check::nll::type_check::TypeChecker::fully_perform_op (7% total, 0% self)
: : : : : : : | rustc::infer::InferCtxt::take_and_reset_region_constraints (5% total, 0% self)
: : : : : : : : | rustc::infer::region_constraints::RegionConstraintCollector::take_and_reset_data (5% total, 0% self)
: : : : : : : : : | &lt;ena::unify::UnificationTable&lt;S&gt;&gt;::reset_unifications (5% total, 5% self)
: : : : | rustc_mir::borrow_check::nll::type_check::TypeChecker::sub_types (6% total, 0% self)
: : : : : | rustc::infer::InferCtxt::take_and_reset_region_constraints (5% total, 0% self)
: : : : : : | rustc::infer::region_constraints::RegionConstraintCollector::take_and_reset_data (5% total, 0% self)
: : : : : : : | &lt;ena::unify::UnificationTable&lt;S&gt;&gt;::reset_unifications (5% total, 5% self)
: : : : | &lt;rustc_mir::borrow_check::nll::type_check::TypeVerifier&lt;&#39;a, &#39;b, &#39;gcx, &#39;tcx&gt; as rustc::mir::visit::Visitor&lt;&#39;tcx&gt;&gt;::visit_mir (4% total, 0% self)
: : : : : | &lt;rustc_mir::borrow_check::nll::type_check::TypeVerifier&lt;&#39;a, &#39;b, &#39;gcx, &#39;tcx&gt; as rustc::mir::visit::Visitor&lt;&#39;tcx&gt;&gt;::visit_constant (3% total, 0% self)
: : | rustc_mir::util::liveness::liveness_of_locals (3% total, 0% self)
: | rustc::mir::visit::Visitor::visit_mir (6% total, 4% self)
: | &lt;rustc_mir::borrow_check::MirBorrowckCtxt&lt;&#39;cx, &#39;gcx, &#39;tcx&gt; as rustc_mir::dataflow::DataflowResultsConsumer&lt;&#39;cx, &#39;tcx&gt;&gt;::visit_statement_entry (5% total, 0% self)
: | rustc_mir::dataflow::do_dataflow (3% total, 0% self)
</pre></div>



<a name="127955428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955428">(Jun 12 2018 at 14:15)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> do you reproduce the NLL slowdown on clap-rs ?</p>



<a name="127955494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955494">(Jun 12 2018 at 14:16)</a>:</h4>
<p>now I'm not sure what you meant by the slowdown, maybe we are talking about different thing</p>



<a name="127955506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955506">(Jun 12 2018 at 14:16)</a>:</h4>
<p>thought Niko mentioned me here because of this data</p>



<a name="127955517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955517">(Jun 12 2018 at 14:17)</a>:</h4>
<p>cargo check on clap is 2-3x slower with NLL than without NLL</p>



<a name="127955526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955526">(Jun 12 2018 at 14:17)</a>:</h4>
<p>ok, I can just measure that</p>



<a name="127955594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955594">(Jun 12 2018 at 14:18)</a>:</h4>
<p>how are you measuring that?</p>



<a name="127955599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955599">(Jun 12 2018 at 14:19)</a>:</h4>
<p>using clap-rs on rustc-perf?</p>



<a name="127955607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955607">(Jun 12 2018 at 14:19)</a>:</h4>
<p>well what <span class="user-mention" data-user-id="116107">@David Wood</span> failed to reproduce was not the slowdown</p>



<a name="127955610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955610">(Jun 12 2018 at 14:19)</a>:</h4>
<p>but rather the mysterios <code>visit_mir</code> calls`</p>



<a name="127955613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955613">(Jun 12 2018 at 14:19)</a>:</h4>
<p>I see them in <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span>'s profile though</p>



<a name="127955618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955618">(Jun 12 2018 at 14:19)</a>:</h4>
<div class="codehilite"><pre><span></span>: | rustc::mir::visit::Visitor::visit_mir (6% total, 4% self)
</pre></div>



<a name="127955631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955631">(Jun 12 2018 at 14:19)</a>:</h4>
<p>so the "strangeness" is only those calls missing ?</p>



<a name="127955678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955678">(Jun 12 2018 at 14:20)</a>:</h4>
<p>well so we don't know who is making those calls</p>



<a name="127955689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955689">(Jun 12 2018 at 14:20)</a>:</h4>
<p>so what I had in mind was to try and instrument rustc very closely</p>



<a name="127955690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955690">(Jun 12 2018 at 14:20)</a>:</h4>
<p>if <span class="user-mention" data-user-id="116107">@David Wood</span> has the slowdown, we're not sure either what is slow on their profile either then :)</p>



<a name="127955692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955692">(Jun 12 2018 at 14:20)</a>:</h4>
<p>and try to track down where they are coming from</p>



<a name="127955700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955700">(Jun 12 2018 at 14:20)</a>:</h4>
<p>I do recall that <span class="user-mention" data-user-id="116107">@David Wood</span>'s numbers seemed to be "missing" the same percentage</p>



<a name="127955712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955712">(Jun 12 2018 at 14:21)</a>:</h4>
<p>that is, about 7% of total MIR borrowck time was unaccounted for</p>



<a name="127955791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955791">(Jun 12 2018 at 14:22)</a>:</h4>
<p>and btw ...</p>



<a name="127955812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955812">(Jun 12 2018 at 14:23)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux clap-rs (master)]$ touch src/lib.rs
[santiago@archlinux clap-rs (master)]$ time cargo +rust-prof build
warning: profile `doc` is deprecated and has no effect
   Compiling clap v2.29.0 (file:///home/santiago/src/oss/rustc-perf/collector/benchmarks/clap-rs)
warning: use of deprecated item &#39;std::ascii::AsciiExt&#39;: use inherent methods instead
 --&gt; src/app/settings.rs:3:5
  |
3 | use std::ascii::AsciiExt;
  |     ^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(deprecated)] on by default

warning: use of deprecated item &#39;std::ascii::AsciiExt&#39;: use inherent methods instead
 --&gt; src/app/validator.rs:4:5
  |
4 | use std::ascii::AsciiExt;
  |     ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item &#39;std::ascii::AsciiExt&#39;: use inherent methods instead
 --&gt; src/args/settings.rs:3:5
  |
3 | use std::ascii::AsciiExt;
  |     ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item &#39;std::ascii::AsciiExt&#39;: use inherent methods instead
 --&gt; src/completions/zsh.rs:4:5
  |
4 | use std::ascii::AsciiExt;
  |     ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item &#39;std::ascii::AsciiExt&#39;: use inherent methods instead
 --&gt; src/completions/shell.rs:2:5
  |
2 | use std::ascii::AsciiExt;
  |     ^^^^^^^^^^^^^^^^^^^^

    Finished dev [unoptimized + debuginfo] target(s) in 4.56s

real    0m4.577s
user    0m3.991s
sys 0m0.582s
[santiago@archlinux clap-rs (master)]$ touch src/lib.rs
[santiago@archlinux clap-rs (master)]$ time cargo +rust-prof rustc -- -Zborrowck=mir
warning: profile `doc` is deprecated and has no effect
   Compiling clap v2.29.0 (file:///home/santiago/src/oss/rustc-perf/collector/benchmarks/clap-rs)
warning: use of deprecated item &#39;std::ascii::AsciiExt&#39;: use inherent methods instead
 --&gt; src/app/settings.rs:3:5
  |
3 | use std::ascii::AsciiExt;
  |     ^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(deprecated)] on by default

warning: use of deprecated item &#39;std::ascii::AsciiExt&#39;: use inherent methods instead
 --&gt; src/app/validator.rs:4:5
  |
4 | use std::ascii::AsciiExt;
  |     ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item &#39;std::ascii::AsciiExt&#39;: use inherent methods instead
 --&gt; src/args/settings.rs:3:5
  |
3 | use std::ascii::AsciiExt;
  |     ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item &#39;std::ascii::AsciiExt&#39;: use inherent methods instead
 --&gt; src/completions/zsh.rs:4:5
  |
4 | use std::ascii::AsciiExt;
  |     ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item &#39;std::ascii::AsciiExt&#39;: use inherent methods instead
 --&gt; src/completions/shell.rs:2:5
  |
2 | use std::ascii::AsciiExt;
  |     ^^^^^^^^^^^^^^^^^^^^

    Finished dev [unoptimized + debuginfo] target(s) in 32.67s

real    0m32.700s
user    0m48.666s
sys 0m0.913s
</pre></div>



<a name="127955826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955826">(Jun 12 2018 at 14:23)</a>:</h4>
<p>4.577s vs 32.700s</p>



<a name="127955829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955829">(Jun 12 2018 at 14:23)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> since your profile has our weird visit_mir calls, you're in the same situation as we are :) but if you need it, the NLL slowdown can be seen comparing for example <code>cargo +nightly clean &amp;&amp; CARGO_INCREMENTAL=0 cargo +nightly check &amp;&amp; touch src/lib.rs &amp;&amp; time CARGO_INCREMENTAL=0 cargo +nightly rustc --profile check --lib</code> vs <code>cargo +nightly clean &amp;&amp; CARGO_INCREMENTAL=0 cargo +nightly check &amp;&amp; touch src/lib.rs &amp;&amp; time CARGO_INCREMENTAL=0 cargo +nightly rustc --profile check --lib -- -Zborrowck=mir</code></p>



<a name="127955875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955875">(Jun 12 2018 at 14:24)</a>:</h4>
<div class="codehilite"><pre><span></span>❯ ~/.cargo/bin/perf-focus &#39;{do_mir_borrowck}&#39; --tree-callees --tree-max-depth 1
Matcher    : {do_mir_borrowck}
Matches    : 2184
Not Matches: 4383
Percentage : 33%

Tree
| matched `{do_mir_borrowck}` (33% total, 0% self)
: | rustc_mir::borrow_check::nll::compute_regions (24% total, 0% self) [...]
: | rustc_mir::dataflow::DataflowResultsConsumer::analyze_results (2% total, 0% self) [...]
: | rustc_mir::dataflow::do_dataflow (2% total, 0% self) [...]
: | &lt;rustc::mir::Mir&lt;&#39;tcx&gt; as rustc_mir::util::collect_writes::FindAssignments&gt;::find_assignments (1% total, 0% self) [...]
: | rustc_mir::borrow_check::nll::replace_regions_in_mir (0% total, 0% self) [...]
: | rustc_mir::dataflow::impls::borrows::Borrows::new (0% total, 0% self) [...]
: | &lt;alloc::rc::Rc&lt;T&gt; as core::ops::drop::Drop&gt;::drop (0% total, 0% self) [...]
: | rustc_mir::dataflow::move_paths::MoveData::gather_moves (0% total, 0% self) [...]
: | rustc_mir::borrow_check::borrow_set::BorrowSet::build (0% total, 0% self) [...]
: | core::ptr::drop_in_place (0% total, 0% self) [...]
: | &lt;rustc::mir::Mir&lt;&#39;tcx&gt; as core::clone::Clone&gt;::clone (0% total, 0% self) [...]
: | _init (0% total, 0% self)
: | rustc_mir::borrow_check::location::LocationTable::new (0% total, 0% self) [...]
: | rustc::ty::maps::&lt;impl rustc::ty::context::TyCtxt&lt;&#39;a, &#39;tcx, &#39;lcx&gt;&gt;::param_env (0% total, 0% self) [...]
: | rustc_data_structures::control_flow_graph::dominators::dominators (0% total, 0% self) [...]
</pre></div>


<p>Here's my data from before.</p>



<a name="127955889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955889">(Jun 12 2018 at 14:24)</a>:</h4>
<p>Apparently Zulip doesn't like quoting code blocks.</p>



<a name="127955894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955894">(Jun 12 2018 at 14:24)</a>:</h4>
<blockquote>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> since your profile has our weird visit_mir calls, you're in the same situation as we are :) but if you need it, the NLL slowdown can be seen comparing for example <code>cargo +nightly clean &amp;&amp; CARGO_INCREMENTAL=0 cargo +nightly check &amp;&amp; touch src/lib.rs &amp;&amp; time CARGO_INCREMENTAL=0 cargo +nightly rustc --profile check --lib</code> vs <code>cargo +nightly clean &amp;&amp; CARGO_INCREMENTAL=0 cargo +nightly check &amp;&amp; touch src/lib.rs &amp;&amp; time CARGO_INCREMENTAL=0 cargo +nightly rustc --profile check --lib  -- -Zborrowck=mir</code></p>
</blockquote>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="127955918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127955918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127955918">(Jun 12 2018 at 14:25)</a>:</h4>
<p>I've still got the build so when I get home I can run it again.</p>



<a name="127956878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127956878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127956878">(Jun 12 2018 at 14:46)</a>:</h4>
<p>oh I hadn't noticed that the rustc-perf repo can't be cloned on windows (cc <span class="user-mention" data-user-id="116122">@simulacrum</span>) but with this partial clone I can at least reproduce the coercions slowdown for sure (&lt;1s vs 17s); I can't really profile on windows though so I'll try later tonight :)</p>



<a name="127960921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127960921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127960921">(Jun 12 2018 at 16:05)</a>:</h4>
<p>oh but valgrind runs :3 this <code>coercions</code> profile might be trash but just in case: could "95% of the time is now spent in ena's UnificationTable::reset_unifications" make sense for a huge static array of strs <span class="user-mention" data-user-id="116009">@nikomatsakis</span> ?</p>



<a name="127962567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127962567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127962567">(Jun 12 2018 at 16:42)</a>:</h4>
<p>ah. yes.</p>



<a name="127962569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127962569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127962569">(Jun 12 2018 at 16:42)</a>:</h4>
<p>I suspect my pending PR will make a huge difference here.</p>



<a name="127962571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127962571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127962571">(Jun 12 2018 at 16:42)</a>:</h4>
<p>gotta fix those bugs.</p>



<a name="127962578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127962578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127962578">(Jun 12 2018 at 16:42)</a>:</h4>
<p>I found the cause but I have to do a bit of refactoring to fix properly</p>



<a name="127964058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127964058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127964058">(Jun 12 2018 at 17:17)</a>:</h4>
<p>I'll look into the windows issue, though I don't have access to windows so it might be somewhat hard to test. Should be able to figure something out though.</p>



<a name="127971875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127971875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127971875">(Jun 12 2018 at 20:04)</a>:</h4>
<p>redoing the <code>coercions</code> profile on osx seems to still point at heavier usage of ena in <code>RegionConstraintCollector::take_and_reset_data</code>, but here/now it's 93% <code>SnapshotVec::set_all</code>... I'll be looking forward to the comparisons with profiles made by others</p>



<a name="127994125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/127994125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#127994125">(Jun 13 2018 at 07:09)</a>:</h4>
<p>we're still unsure about where the <code>visir_mir</code>calls are coming from ? is there something I could do to help gather some information about that ?</p>



<a name="128002226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128002226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128002226">(Jun 13 2018 at 10:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> is this how I should do it: set up a String global variable in <code>librustc::mir::visit</code>, which would be printed in the visitor <code>super_mir</code>, and update this string context in different parts of NLL's <code>do_mir_borrowck</code> to tally up the different calls ?</p>



<a name="128004958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128004958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128004958">(Jun 13 2018 at 12:11)</a>:</h4>
<p><span class="user-mention" data-user-id="116113">@lqd</span> I would probably do something like. Or else, set the variable to TRUE for each path that we know of (and FALSE afterwards), and then assert that it is TRUE in the mysterious <code>visit_mir</code>?</p>



<a name="128004969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128004969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128004969">(Jun 13 2018 at 12:11)</a>:</h4>
<p>basically looking to find the path that makes it assert</p>



<a name="128004979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128004979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128004979">(Jun 13 2018 at 12:11)</a>:</h4>
<p>but I think the idea of recording "where each call comes from" is probably better</p>



<a name="128005026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128005026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128005026">(Jun 13 2018 at 12:12)</a>:</h4>
<p>since there is a decent chance that this is indeed a profiler fail</p>



<a name="128005030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128005030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128005030">(Jun 13 2018 at 12:12)</a>:</h4>
<p>and in fact the calls <em>are</em> coming from one of the places we know of</p>



<a name="128005032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128005032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128005032">(Jun 13 2018 at 12:12)</a>:</h4>
<p>and the backtrace is just wrong</p>



<a name="128005038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128005038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128005038">(Jun 13 2018 at 12:12)</a>:</h4>
<p>if I'm not sorely mistaken I think around half of the visit_mir calls come from parts of do_mir_borrowck</p>



<a name="128005056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128005056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128005056">(Jun 13 2018 at 12:13)</a>:</h4>
<p>are you able to narrow down <em>where</em> from within <code>do_mir_borrowck</code>?</p>



<a name="128005060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128005060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128005060">(Jun 13 2018 at 12:13)</a>:</h4>
<p>like, can you just update your variable at various points</p>



<a name="128005062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128005062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128005062">(Jun 13 2018 at 12:13)</a>:</h4>
<p>and see what comes out?</p>



<a name="128005068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128005068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128005068">(Jun 13 2018 at 12:13)</a>:</h4>
<p>(binary search-esque)</p>



<a name="128005125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128005125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128005125">(Jun 13 2018 at 12:14)</a>:</h4>
<p>yeah I can update it at various points in the fn</p>



<a name="128027644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128027644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128027644">(Jun 13 2018 at 20:16)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> update: callgrind reports around 8-8.1k calls to <code>visit_mir</code>, but a println in <code>super_mir</code> yields 31k results — and I'm now a bit more confused than I was when I started this; binary search-esque results are <a href="https://gist.github.com/lqd/7e178cb9ac8302e24272965048627f21" target="_blank" title="https://gist.github.com/lqd/7e178cb9ac8302e24272965048627f21">here</a> where I moved the tracing between different "regions" of the code. I will need to recheck all of these tomorrow because of this confusing bit: <code>mir_borrowck</code> yields 4.9k <code>super_mir</code>traces, while a part of <code>do_mir_borrowck</code> does 8.1k :/</p>



<a name="128049921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128049921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128049921">(Jun 14 2018 at 06:43)</a>:</h4>
<p>... a night's sleep and it makes sense ... one last trace and this should be done</p>



<a name="128063170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128063170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128063170">(Jun 14 2018 at 12:57)</a>:</h4>
<p>for those following at home my <code>visit_mir</code> / <code>super_mir</code> rollercoaster adventures, I'm back at "I'm missing something"</p>



<a name="128063246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128063246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128063246">(Jun 14 2018 at 12:59)</a>:</h4>
<p>d'oh :)</p>



<a name="128078068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128078068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128078068">(Jun 14 2018 at 18:10)</a>:</h4>
<p>oh but mir_borrowck is recursive, this seems a key fact to find out now :p</p>



<a name="128079474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128079474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128079474">(Jun 14 2018 at 18:40)</a>:</h4>
<p>(something like maybe <code>nll::compute_regions</code> indirectly calling <code>mir_borrowck</code>again — to the stack-of-traces mobile!)</p>



<a name="128079677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128079677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128079677">(Jun 14 2018 at 18:45)</a>:</h4>
<p>hmm, that's a good point, I had sort of forgotten about that</p>



<a name="128079821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128079821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128079821">(Jun 14 2018 at 18:48)</a>:</h4>
<p>good to remember if/when we parallelize one day :)</p>



<a name="128079982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128079982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128079982">(Jun 14 2018 at 18:51)</a>:</h4>
<p>not really relevant</p>



<a name="128079987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128079987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128079987">(Jun 14 2018 at 18:51)</a>:</h4>
<p>for that in particular</p>



<a name="128079990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128079990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128079990">(Jun 14 2018 at 18:51)</a>:</h4>
<p>I mean, it recurses via a query basically</p>



<a name="128079992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128079992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128079992">(Jun 14 2018 at 18:51)</a>:</h4>
<p>and that will "just work" with the parallelization work</p>



<a name="128080030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128080030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128080030">(Jun 14 2018 at 18:52)</a>:</h4>
<p>(which is in progress btw...)</p>



<a name="128080042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128080042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128080042">(Jun 14 2018 at 18:52)</a>:</h4>
<p>(specifically it recurses in the case of a fn analyzing the closures contained within)</p>



<a name="128080071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128080071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128080071">(Jun 14 2018 at 18:53)</a>:</h4>
<p>good to know!</p>



<a name="128080075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128080075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128080075">(Jun 14 2018 at 18:53)</a>:</h4>
<p>yeah zoxc's work IIRC</p>



<a name="128124903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128124903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128124903">(Jun 15 2018 at 15:17)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  I finally managed to locate the origins of the MIR borrowck <code>super_mir</code> calls (which I assume would be related to the mysterious <code>visit_mir</code> calls), does <a href="https://gist.github.com/lqd/7e178cb9ac8302e24272965048627f21" target="_blank" title="https://gist.github.com/lqd/7e178cb9ac8302e24272965048627f21">this</a> help ?</p>



<a name="128142567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128142567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128142567">(Jun 15 2018 at 21:36)</a>:</h4>
<p><span class="user-mention" data-user-id="116113">@lqd</span> actually, yes it does =) I <em>suspect</em> that <a href="https://gist.github.com/lqd/7e178cb9ac8302e24272965048627f21#file-mod-rs-L243-L256" target="_blank" title="https://gist.github.com/lqd/7e178cb9ac8302e24272965048627f21#file-mod-rs-L243-L256">this is the mysterious source</a></p>



<a name="128142647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128142647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128142647">(Jun 15 2018 at 21:39)</a>:</h4>
<p>callgrind reported around the same number of visit_mir calls</p>



<a name="128142712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128142712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128142712">(Jun 15 2018 at 21:40)</a>:</h4>
<p>and hehe this is the part of the code where the non-recursive proof tracing behaviour was the most confusing :)</p>



<a name="128201022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/profiling-rustc/near/128201022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/profiling-rustc.html#128201022">(Jun 17 2018 at 10:48)</a>:</h4>
<p>I forgot to mention I had already massaged this loop a little to confirm that the find_assignments call was the only source of mir visits in this part of the code indeed</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>